import request from '@/utils/request';

// 楼层和科室的关系表,一对多新增
export function floorDeptAdd(data) {
  return request({
    url: '/floorDept/add',
    method: 'post',
    data,
  });
}

// 楼层和科室的关系表,一对多新增
export function floorDeptUpdate(data) {
  return request({
    url: `/floorDept/${data.id}`,
    method: 'post',
    data,
  });
}

// 根据院区获取楼层列表
export function getList(params) {
  return request({
    url: '/floorDept/getList',
    method: 'get',
    params,
  });
}

// 楼层和科室的关系表,一对多删除
export function deleteFloor(id) {
  return request({
    url: `/floorDept/deleted/${id}`,
    method: 'delete',
  });
}

// 获取被选择过的科室
export function getSelectedDept(params) {
  return request({
    url: `floorDept/getSelectedDept`,
    method: 'get',
    params,
  });
}
